import com.alibaba.fastjson.{JSON, JSONException, JSONObject}

object jsonUgly {
  def main(args: Array[String]): Unit = {
    val str: String = "{feafl:faefafee,123}"
    var ugly: Boolean = false
    try {
      val jsonObj: JSONObject = JSON.parseObject(str)
      println(jsonObj)
      ugly = true
    }catch {
      case ex: JSONException =>println("数据为脏数据！")
    }
    if (ugly) {
      println("数据格式正确！！")
    }

  }
}
